package com.java1412.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author java1412
 * @since 2023-06-06 16:40:17
 */
// 作为Feign客户端,value表示服务提供者的应用的名称
// fallback是一个兜底方案的实现类，该实现类需要实现当前的接口
@FeignClient(value = "SERVICE-HI", fallback = SchedualServiceHiHystrix.class)
public interface SchedualServiceHi {
    @RequestMapping(value = "/hi", method = RequestMethod.GET)
    public String sayHiFromClientOne(@RequestParam(name = "name") String name);
}
